package com.cnpc.ds.service.impl;

import cn.hutool.extra.spring.SpringUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.cnpc.ds.mapper.CommMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CommServiceImpl {

    @Autowired
    CommMapper commMapper;

    /**
     * 根据条件删除某个表得数据 物理删除
     * @param table
     * @param queryWrapper
     */
    public static void deleteBySqlSegment(String table, QueryWrapper queryWrapper){
        CommMapper commMapper = SpringUtil.getBean(CommMapper.class);
        commMapper.deleteBySqlSegment(table,queryWrapper);
    }

}
